/**
 * Created by Administrator on 2017/12/5.
 */
import React, {PureComponent} from 'react';
import {Table, Alert,Select, Badge, Switch, Icon,Button, InputNumber, Tooltip, Popconfirm} from 'antd';
import styles from './index.less';
const Option = Select.Option;

export default class ExamineIndex extends PureComponent{
    handleTableChange = (pagination, filters, sorter) => {
        this.props.onChange(pagination, filters, sorter);
    }
    render(){
        const {data: {list, pagination}, loading} = this.props;
        const columns = [
            {
                title: '申请编号',
                dataIndex: 'task_id',
                key: 'task_id',
            }, {
                title: '会员编号',
                dataIndex: 'user_id',
                key: 'user_id',
            }, {
                title: '申请类型',
                dataIndex: 'task_type',
                key: 'task_type',
            }, {
                title: '申请时间',
                dataIndex: 'create_time',
                key: 'create_time',
            },{
                title: '审核时间',
                dataIndex:'check_time',
                key:'check_time'
            }, {
                title: '审核人编号',
                dataIndex:'admin_id',
                key:'admin_id'
            },{
                title: '审核说明',
                dataIndex:'check_remark',
                key:'check_remark'
            },
        ];
        const paginationProps = {
            showSizeChanger: true,
            showQuickJumper: true,
            ...pagination,
        };
        return (
            <div className={styles.standardTable}>
                <Table
                    loading={loading}
                    rowKey={record => record.task_id}
                    dataSource={list}
                    columns={columns}
                    pagination={paginationProps}
                    onChange={this.handleTableChange}
                />
            </div>
        );
    }
}